package pack.actions;

import com.jme.math.Vector3f;
import com.jmex.physics.DynamicPhysicsNode;

public class TurnAction implements Runnable 
{
    private boolean right;
    private DynamicPhysicsNode player;	
    private float turnSpeed  = 300000;
	
	public TurnAction(boolean right, DynamicPhysicsNode player)
	{
		this.right  = right;
		this.player = player;
	}

	public void run() {
		player.addTorque(new Vector3f(0, (right==true?-1:1)*turnSpeed, 0));
	}
}
